package com.yzt.dynamicmodule.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
//import com.yzt.businessbasemodule.R;
import com.yzt.dynamicmodule.R;
import com.yzt.zhuju.network.entity.dynamic.DynamicMsgChildBean;
import com.yzt.plugin_imageloader.ImageLoadUtil;

/**
 * author : bob
 * date   : 2023/2/28
 * desc   : 动态留言子列表
 */
public class DynamicMsgChildAdapter extends BaseQuickAdapter<DynamicMsgChildBean, BaseViewHolder> {

    public DynamicMsgChildAdapter() {
        super(R.layout.item_dynamic_msg_child);
    }

    @Override
    protected void convert(BaseViewHolder holder, DynamicMsgChildBean item) {

        String head = item.getAvatar();
        ImageLoadUtil.loadAvatar(getContext(), head, holder.getView(R.id.img_header));
        holder.setText(R.id.tv_user_name, item.getNickName());
        holder.setText(R.id.tv_time, item.getCreateTime());
        holder.setText(R.id.tv_content, item.getContent());
    }
}